const express = require('express');
const bodyParser = require('body-parser');
const path = require('path');

const app = express();

app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.use(express.static(path.join(__dirname, 'public')));

const indexRouter = require('./routes/index');
// const usersRouter = require('./routes/users');

// const adminRouter = require('./routes/admin');
const orderRouter = require('./routes/order');

app.use('/', indexRouter);
// app.use('/user', usersRouter);
// app.use('/admin', adminRouter);
app.use('/order', orderRouter);


// app.get('/', (req, res) => {

//   res.send({msg: 'home'});
// });

app.listen( 3000, function (){
  console.log('server is running.');
});
